﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using IDAL;
using Model;
namespace BLL
{
    public class ordersBLL
    {
        private IordersDAL orderDAL = DALFactory.DateAccess.GetIordersDAL();
        public void AddOrders(orders o)
        {
            orderDAL.AddOrders(o);
        }
        public orders GetLastOrder(int uid)
        {
            return orderDAL.GetLastOrder(uid);
        }
        public orders GetOrderByID(int id)
        {
            return orderDAL.GetOrderByID(id);
        }
        public void UpdateOrder(orders o)
        {
            orderDAL.UpdateOrder(o);
        }
        public IQueryable<orders> GetOrdersByUid(int uid)
        {
            return orderDAL.GetOrdersByUid(uid);
        }
        public void Confirm(int oid)
        {
            orderDAL.Confirm(oid);
        }
        public void ModifyState(int o, int state)
        {
            orderDAL.ModifyOrderState(o, state);
        }
    }
}